Method, apparatus and terminal for matching expression image

ABSTRACT

An expression image matching method includes obtaining an identity of a session in which a user chats, the session being a dialog set in which the user chats with at least one other user. The method determines, according to a white list and the identity of the session, whether to provide an expression image to the user, and the white list comprising an identity of a session in which a frequency of using expression images meets a predefined condition. The method provides an expression image matching with chat content input by the user when determining to provide the expression image to the user.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2015/098078 filed on Dec. 21, 2015. This application claimsthe benefit and priority of Chinese Application No. 201510008126.8,filed on Jan. 7, 2015. The entire disclosures of each of the aboveapplications are incorporated herein by reference.

FIELD

The present disclosure relates to Internet communication technologiesand to an expression image matching method, apparatus and terminal.

BACKGROUND

This section provides background information related to the presentdisclosure which is not necessarily prior art.

A user often chats with friends through a social application. Whenchatting with a friend, the user may send expression images to thefriend to increase interest of the chat. In order to increase the clickrate of expression images, a terminal may provide an expression imagematching with chat content of the user, so that the user may click anduse the expression image conveniently.

One expression image corresponds to at least one word. The word may beused to describe emotion or thought expressed by the expression image.When the user chats with a friend, the terminal may provide expressionimages matching with chat content to the user through the followingmethods. The terminal obtains the chat content input by the user,determines whether the chat content includes a word corresponding to anexpression image, and when determining that the chat content includes aword corresponding to an expression image, provides the expression imageto the user. Through this method, the user may conveniently click theexpression image.

In some scenarios, the user rarely uses expression images when chattingwith a friend. In this case, if the terminal provides expression imagesto the user, the user will be disturbed. For example, the user does notlike to use expression images, or the user is chatting with a colleagueor a boss, and thus it is improper to use expression images because thediscussed topic is serious. In this case, if the terminal providesexpression images to the user, the user will be disturbed.

SUMMARY

This section provides a general summary of the disclosure, and is not acomprehensive disclosure of its full scope or all of its features.

In order to avoid disturbing a user when providing expression images,the present disclosure provides an expression image matching method,apparatus and terminal. The technical method of the present disclosureis implemented as follows.

An expression image matching method includes:

-   -   obtaining an identity of a session in which a user chats, the        session being a dialog set in which the user chats with at least        one other user;    -   determining, according to a white list and the identity of the        session, whether to provide an expression image to the user, the        white list comprising an identity of a session in which a        frequency of using expression images meets a predefined        condition; and    -   providing an expression image matching with chat content input        by the user when determining whether to provide the expression        image to the user.

An expression image matching apparatus includes:

-   -   an obtaining module, configured to obtain an identity of a        session in which a user chats, the session being a dialog set in        which the user chats with at least one other user;    -   a determining module, configured to determine, according to a        white list and the identity of the session, whether to provide        an expression image to the user, and the white list including an        identity of a session in which a frequency of using expression        images meets a predefined condition; and    -   a matching module, configured to provide an expression image        matching with chat content input by the user when determining        whether to provide the expression image to the user.

A terminal includes:

-   -   one or more processors and a storage, wherein    -   the storage is configured to store one or more programs, and the        one or more programs are configured to be executed by the one or        more processors, and comprise instructions for performing the        following operations of:    -   obtaining an identity of a session in which a user chats, the        session being a dialog set in which the user chats with at least        one other user;    -   determining, according to a white list and the identity of the        session, whether to provide an expression image to the user, and        the white list comprising an identity of a session in which a        frequency of using expression images meets a predefined        condition; and    -   providing an expression image matching with chat content input        by the user when determining whether to provide the expression        image to the user.

In the various embodiments of the present disclosure, the identity ofthe session in which the user chats is obtained. According to the whitelist and the identity of the session, it is determined whether toprovide an expression image to the user. The white list includes anidentity of a session in which a frequency of using expression imagesmeets a predefined condition. When determining whether to provide anexpression image to the user, an expression image matching with the chatcontent input by the user is provided to the user. Because the identityof the session in which the frequency of using expression images meetsthe predefined condition is added to the white list, it can bedetermined whether to provide an expression image to the user accordingto the white list and the identity of the session. In this way, it canbe determined whether it is proper to use expression images in thesession, so as to avoid disturbing the user when providing expressionimages to the user.

Further areas of applicability will become apparent from the descriptionprovided herein. The description and specific examples in this summaryare intended for purposes of illustration only and are not intended tolimit the scope of the present disclosure.

DRAWINGS

The drawings described herein are for illustrative purposes only ofselected embodiments and not all possible implementations, and are notintended to limit the scope of the present disclosure.

FIG. 1 is a flowchart illustrating an expression image matching methodaccording to various embodiments of the present disclosure.

FIG. 2-1 is a flowchart illustrating an expression image matching methodaccording to various embodiments of the present disclosure.

FIG. 2-2 is a diagram illustrating a first chat window according tovarious embodiments of the present disclosure.

FIG. 2-3 is a diagram illustrating a second chat window according tovarious embodiments of the present disclosure.

FIG. 2-4 is a diagram illustrating a third chat window according tovarious embodiments of the present disclosure.

FIG. 3 is a flowchart illustrating an expression image matching methodaccording to various embodiments of the present disclosure.

FIG. 4 is a flowchart illustrating an expression image matching methodaccording to various embodiments of the present disclosure.

FIG. 5 is a diagram illustrating an expression image matching apparatusaccording to various embodiments of the present disclosure.

FIG. 6 is a diagram illustrating the structure of a terminal accordingto various embodiments of the present disclosure.

Corresponding reference numerals indicate corresponding parts throughoutthe several views of the drawings.

DETAILED DESCRIPTION

Example embodiments will now be described more fully with reference tothe accompanying drawings.

In order to make the object, technical solution and merits of thepresent application clearer, the present application will be illustratedin detail hereinafter with reference to the accompanying drawings andembodiments.

In FIG. 1, various embodiments of the present disclosure provide anexpression image matching method. The method includes the followingblocks.

Block 101: An identity of a friend that is currently chatting with auser is obtained.

Block 102: It is determined whether to provide an expression image tothe user according to a white list and the identity of the friend,wherein the white list includes an identity of a friend and a frequencyof using expression images when the friend in the white list chats withthe user meets a predefined condition.

Block 103: When determining whether to provide an expression image tothe user, an expression image matching with chat content input by theuser is provided to the user.

According to various embodiments, before obtaining the identity of thefriend that is currently chatting with the user, the method furtherincludes:

-   -   calculating a frequency of using expression images when the user        chats with each friend according to a chat history of the user,        wherein the chat history includes messages that were generated        when the user chatted with each friend in the past; and    -   adding an identity of a friend to the white list if a frequency        of using expression images when the friend added to the white        list chats with the user meets a first predefined condition.

According to various embodiments, a process of calculating the frequencyof using expression images when the user chats with each friendaccording to the chat history of the user includes:

-   -   obtaining, from the chat history of the user, messages that were        generated when the user chatted with a first friend in the past,        wherein the first friend is any friend of the user;    -   counting the number of the obtained messages and the number of        messages containing expression images among the obtained        messages; and    -   calculating a frequency of using expression images when the user        chats with the first friend according to the number of the chat        history message containing expression images and the number of        the obtained messages.

According to various embodiments, a process of adding the identity ofthe friend to the white list if the frequency of using expression imageswhen the friend added to the white list chats with the user meets thefirst predefined condition, includes:

-   -   adding the identity of the friend to the white list if the        frequency of using expression images when the friend added to        the white list chats with the user is larger than a predefined        frequency threshold, or    -   calculating an average frequency according to the frequency of        using expression images when the user chats with each friend,        and adding the identity of the friend to the white list if the        frequency of using expression images when the friend added to        the white list chats with the user is larger than the average        frequency.

According to various embodiments, after adding the identity of thefriend to the white list if the frequency of using expression imageswhen the friend added to the white list chats with the user meets thefirst predefined condition, the method further includes:

-   -   obtaining a frequency of the user sending expression images and        a frequency of a second friend sending expression images,        wherein the second friend is a friend of the user excluded from        the white list; if a comparing result between the frequency of        the user sending expression images and the frequency of the        second friend sending expression images meets a second        predefined condition, adding an identity of the second friend to        the white list.

According to various embodiments, a process of providing the expressionimage matching with the chat content input by the user includes:

-   -   obtaining an expression word contained in the chat content input        by the user;    -   obtaining an expression image corresponding to the expression        word;    -   determining the number of sending operations performed for the        obtained expression image according to a relationship between        the obtained expression image, the number of sending operations        performed for the obtained expression image, and the identity of        the friend; and    -   displaying the obtained expression image to the user according        to the number of sending operations performed for the expression        image.

According to various embodiments, before obtaining the expression wordcontained in the chat content input by the user, the method furtherincludes:

-   -   obtaining an expression image sent by the user and the number of        sending operations performed for the expression image from the        messages that were generated when the user chatted with the        friend in the past, and storing the relationship between the        expression image, the number of sending operations performed for        the expression image, and the identity of the friend.

According to various embodiments, a process of providing the expressionimage matching with the chat content input by the user includes:

-   -   if an average frequency of the user using expression images is        smaller than a predefined average frequency, determining that        the user uses less expression images, and decreasing a frequency        of providing expression images to the user.

According to various embodiments of the present disclosure, the identityof the friend that is currently chatting with the user is obtained.According to the white list and the identity of the friend, it isdetermined whether to provide an expression image to the user. The whitelist includes an identity of a friend, wherein a frequency of usingexpression images when the friend in the white list chats with the usermeets a predefined condition. When determining whether to provide anexpression image to the user, an expression image matching with the chatcontent input by the user is provided to the user. Because the identityof the friend is added to the white list if the frequency of usingexpression images when the friend added to the white list chats with theuser meets the predefined condition, it can be determined whether toprovide an expression image to the user according to the white list andthe identity of the friend. In this way, it can be determined whether itis proper to use expression images when the user chats with the friend,so as to avoid disturbing the user when providing expression images tothe user.

In FIG. 2-1, various embodiments of the present disclosure provide aflowchart illustrating an expression image matching method. A bodyexecuting the method may be a terminal. The method includes thefollowing blocks.

Before providing an expression image to a user, a white listcorresponding to the user may be set first according to the followingblocks 201-203. The white list includes an identity of a friend, whereina frequency of using expression images when the friend added to thewhite list chats with the user meets a predefined condition.

Block 201: A frequency of using expression images when the user chatswith each friend is calculated according to a chat history of the user,wherein the chat history includes messages that were generated when theuser chatted with each friend in the past. The chat history of the useris stored in a server. The chat history of the user includes chatmessages that were generated when the user chatted with each friend in arecent period of time. For example, the chat history may include chatmessages that were generated when the user chatted with each friend inthe past week.

In this block, a request message for obtaining the chat history is sentto the server. The request message contains an identity of the user, sothat the server may obtain the chat history of the user according to theidentity of the user. The chat history of the user sent by the server isreceived. A friend is selected from all friends of the user, and isdetermined as a first friend. messages that were generated when the userchatted with the first friend in the past are obtained from the chathistory of the user. The number of the obtained messages and the numberof messages containing expression images among the obtained messages arecounted. A frequency of using expression images when the user chats withthe first friend according to the number of the obtained messages andthe number of the messages containing expression images is calculated.Similar to the above process performed for the first friend, a frequencyof using expression images when the user chats with each friend may becalculated.

According to various embodiments, a ratio of the number of the messagescontaining expression images to the number of the obtained messages maybe calculated, and may be determined as the frequency of usingexpression images when the user chats with the first friend.

For example, suppose a chat history of user A includes messages thatwere generated when the user A chatted with users B, C, and D in thepast, and the first friend is the user B. The chat messages that weregenerated when the user A chatted with the first friend (i.e., the userB, called the first friend B) in the past are obtained from the historychat record of the user A. Suppose the number of the messages that weregenerated when the user A chatted with the first friend B in the past is100, and the number of messages containing expression images is 50. Thatis, the number of the obtained messages is 100, and the number of themessages containing expression images among the obtained messages is 50.According to the number of the messages containing expression images(i.e., 50) and the number of the obtained messages (i.e., 100), afrequency of using expression images when the user A chats with thefirst friend B is calculated to obtain a value 0.5. Suppose the numberof the messages that were generated when the user A chatted with thefriend C in the past is 200, the number of messages containingexpression images is 40, the number of the messages that were generatedwhen the user A chatted with the friend D in the past is 100, and thenumber of messages containing expression images is 30. According to theabove process, a frequency of using expression images when the user Achats with the friend C is calculated to obtain a value 0.2, and afrequency of using expression images when the user A chats with thefriend D is calculated to obtain a value 0.3.

After obtaining the frequency of using expression images when the userchats with each friend according to the above block 201, the white listmay be set according to following blocks 202 and 203.

Block 202: An identity of a friend is added to the white list if afrequency of using expression images when the friend added to the whitelist chats with the user meets a first predefined condition. Accordingto different first predefined conditions, block 202 may be implementedthrough following first and second methods.

In a first method, the first predefined condition is that of a frequencyof using expression images when a friend chats with the user is largerthan a predefined frequency threshold. Accordingly, an identity of afriend is added to the white list if a frequency of using expressionimages when the friend added to the white list chats with the user islarger than the predefined frequency threshold. The frequency of usingexpression images when the user chats with each friend compares with thepredefined frequency threshold, a friend is selected from all friends ofthe user if a frequency of using expression images by the selectedfriend is larger than the predefined frequency threshold, and anidentity of the selected friend is added to the white list. For example,suppose the predefined frequency threshold is 0.4. The identity (i.e.,IMB) of the friend B is added to the white list if a frequency of usingexpression images when the friend B chats with the user A is larger thanthe predefined frequency threshold 0.4.

In the second method, the first predefined condition is that of afrequency of using expression images when a friend chats with the useris larger than an average frequency. Accordingly, an identity of afriend is added to the white list if a frequency of using expressionimages when the friend added to the white list chats with the user islarger than the average frequency. According to the frequency of usingexpression images when the user chats with each friend, an averagefrequency is calculated, and an identity of a friend is added to thewhite list if a frequency of using expression images when the friendadded to the white list chats with the user is larger than the averagefrequency. The average frequency may be calculated according to afollowing method. The frequency of using expression images when the userchats with each friend is calculated first, and then a sum of allfrequencies is calculated to obtain a total frequency. The number of allfriends of the user are counted, a ratio of the total frequency to thenumber of all friends of the user is calculated, and is determined asthe average frequency.

For example, a frequency of using expression images when the user Achats with each of the friends B, C, and D is calculated first, and thena sum of all frequencies is calculated to obtain a total frequency 1.The number of all friends of the user A is counted to obtain a value 3,a ratio of the total frequency (i.e., 1) to the number of all friends ofthe user A (i.e., 3) is calculated to obtain a value 0.33, and the ratio0.33 is determined as the average frequency. The identity of the friendB is added to the white list because the frequency of using expressionimages when the friend B chats with the user A is larger than theaverage frequency 0.33.

A chat group may be established in a social application. The chat groupincludes multiple members. The user may chat with other members in thechat group at the same time. According to various embodiments of thepresent disclosure, when calculating the frequency of using expressionimages when the user chats with each friend and the average frequency,the chat group is taken as one friend of the user.

When the average frequency of the user is smaller than a predefinedaverage frequency, it can be determined that the user uses lessexpression images and, thus, a frequency of providing expression imagesto the user may be decreased. The predefined average frequency may be anaverage value of frequencies of using expression images by all users inthe social application. Those skilled may count the average frequency ofeach user in the social application, calculate an average value of allaverage frequencies, and determine the average value as the predefinedaverage frequency.

The frequency of providing expression images to the user may bedecreased through the following first and second methods.

In the first method, one expression image matching operation isperformed for the user for each of the predefined number of messages.For example, once the expression image matching operation is performedfor the user every three messages. Suppose the user inputs fivemessages. When the user inputs the first message, the expression imagematching operation is performed for the user. When the user inputs thesecond, third, and fourth messages, no expression image matchingoperation is performed for the user. When the user inputs the fifthmessage, the expression image matching operation is performed for theuser.

In the second method, one expression image matching operation isperformed for the user for a preset period of time and when the userinputs a message. For example, suppose one expression image matchingoperation is performed for the user every half hour. The user chats witha friend during a period of time from 1:00 to 2:00, and inputs a messageat 1:00, 1:20, and 1:30, respectively. Accordingly, when the user inputsthe message at 1:00, one expression image matching operation isperformed for the user. When the user inputs the message at 1:20, noexpression image matching operation is performed for the user. When theuser inputs the message at 1:30, one expression image matching operationis performed for the user. If the user does not input the message at1:30, no expression image matching operation is performed for the user.

After setting the white list according to block 202, an identity of afriend meeting a second predefined condition may be added to the whitelist according to the following block 203.

Block 203: A frequency of the user sending expression images and afrequency of the second friend sending expression images are obtained,wherein the second friend is a friend of the user excluded from thewhite list. If a comparing result between the frequency of the usersending expression images and the frequency of the second friend sendingexpression images meets the second predefined condition, an identity ofthe second friend is added to the white list.

The second predefined condition may be that the frequency of the secondfriend sending expression images is larger than the frequency of theuser sending expression images, or may be that the frequency of thesecond friend sending expression images is a predefined multiple of thefrequency of the user sending expression images. During a chat processin which the user chats with the friend, if the frequency of the friendsending expression images is high, it can be determined that the usermay accept matched expression images. Accordingly, the identity of thefriend may be added to the white list corresponding to the user.

According to various embodiments, a friend is selected from friendsexcluded from the white list, and is taken as the second friend.Messages that were generated when the user chatted with the secondfriend in the past are obtained from the chat history of the user.According to the obtained messages, the number of messages sent by theuser, the number of messages containing expression images sent by theuser, the number of messages sent by the second friend, and the numberof messages containing expression images sent by the second friend arecounted. According to the number of messages containing expressionimages sent by the user and the number of messages sent by the user, thefrequency of the user sending expression images is calculated. Accordingto the number of messages containing expression images sent by thesecond friend and the number of messages sent by the second friend, thefrequency of the second friend sending expression images is calculated.If the frequency of the second friend sending expression images and thefrequency of the user sending expression images meet the secondpredefined condition, the identity of the second friend may be added tothe white list.

Similar to the above process performed for the second friend, it can bedetermined whether a frequency of each friend excluded from the whitelist sending expression images and the frequency of the user sendingexpression images meet the second predefined condition. When determiningthat a frequency of a friend sending expression images and the frequencyof the user sending expression images meet the second predefinedcondition, an identity of the friend may be added to the white list.

For example, suppose the second friend is friend C. From the chathistory of the user A, messages that were generated when the user Achatted with the second friend C in the past are obtained. Suppose amongthe messages that were generated when the user A chatted with the secondfriend C in the past, the number of messages sent by the user A is 100,the number of messages containing expression images sent by the user Ais 10, the number of messages sent by the second friend C is 100, andthe number of messages containing expression images sent by the secondfriend C is 30. Accordingly, from the obtained history chat messages,the number of messages sent by the user A is counted to obtain a value100, the number of messages containing expression images sent by theuser A is counted to obtain a value 10, the number of messages sent bythe second friend C is counted to obtain a value 100, and the number ofmessages containing expression images sent by the second friend C iscounted to obtain a value 30. According to the number of messagescontaining expression images sent by the user A (i.e., 10) and thenumber of messages sent by the user A (i.e., 100), the frequency of theuser A sending expression images is calculated to obtain a value 0.1.According to the number of messages containing expression images sent bythe second friend C (i.e., 30) and the number of messages sent by thesecond friend C (i.e., 100), the frequency of the second friend Csending expression images is calculated to obtain a value 0.3. Supposethe second predefined condition is that the frequency of the secondfriend C sending expression images is larger than the frequency of theuser A sending expression images, the frequency of the second friend Csending expression images (i.e., 0.3) and the frequency of the user Asending expression images (i.e., 0.1) meet the second predefinedcondition, and thus the identity of the second friend C may be added tothe white list.

When setting the white list according to blocks 201-203, a relationshipbetween an expression image, the number of sending operations performedfor the expression image, and an identity of a friend may be storedaccording to following block 204, so as to provide an expression imageto the user according to the number of the user using the expressionimage.

Block 204: An expression image sent by the user and the number ofsending operations performed for the expression image are obtained frommessages that were generated when the user chatted with the friend inthe past, and a relationship between the expression image, the number ofsending operations performed for the expression image and the identityof the friend are stored.

For each friend of the user, messages that were generated when the userchatted with the friend in the past are obtained from the chat historyof the user. Each expression image sent by the user is obtained from theobtained messages, and the number of sending operations performed forthe expression image by the user is counted. Each expression image sentby the user, the number of sending operations performed for theexpression image, and the identity of the friend are stored as arelationship between the expression image, the number of sendingoperations performed for the expression image, and the identity of thefriend.

For each of other friends of the user, according to the above process,each expression image sent by the user when the user chatted with thefriend in the past and the number of sending operations performed forthe expression image are obtained, and the expression image sent by theuser, the number sending operations performed for the expression imageand the identity of the friend are stored as a relationship between theexpression image, the number of sending operations performed for theexpression image and the identity of the friend.

For example, the history chat messages that were generated when the userA chatted with the friend B in the past are obtained from the historychat record of the user A. Expression images Pig1 and Pig2 sent by theuser A are obtained from the obtained messages, the number of sendingoperations performed for the expression image Pig1 by the user A iscounted to obtain a value 10, and the number of sending operationsperformed for the expression image Pig2 by the user A is counted toobtain a value 20. The expression image Pig1 sent by the user A, thenumber of sending operations performed for the expression image Pig1(i.e., 10) and the identity IMB of the friend B are stored as arelationship between the expression image, the number sending operationsperformed for the expression image and the identity of the friend, asshown in Table 1. The expression image Pig2 sent by the user A, thenumber of sending operations performed for the expression image Pig2(i.e., 20) and the identity IMB of the friend B are stored as arelationship between the expression image, the number sending operationsperformed for the expression image and the identity of the friend, asshown in Table 1.

TABLE 1 the number of expression images sending operations identities offriends Pig1 10 IMB Pig2 20 IMB . . . . . . . . .

After setting the white list according to blocks 201-204 and storing therelationship between the expression image, the number of sendingoperations performed for the expression image and the identity of thefriend, the expression image may be provided to the user according tofollowing blocks 205-207.

Block 205: An identity of a friend that is currently chatting with theuser is obtained. The user may chat with the friend through a socialapplication. When chatting with the friend, the user opens a chat windowcorresponding to the friend, and chats with the friend in the chatwindow. When a terminal detects that the user opens a chat windowcorresponding to a friend in the social application, the terminalobtains an identity of the friend corresponding to the chat window. Forexample, when detecting that the user A opens a chat windowcorresponding to the friend B in the social application, the terminalobtains the identity IMB of the friend B corresponding to the chatwindow, as shown in FIG. 2-2.

Block 206: According to the white list and the identity of the friend,it is determined whether to provide an expression image to the user. Ifyes, block 207 is performed; otherwise, the flowchart terminates. Theterminal obtains the white list corresponding to the user and checkswhether the white list includes the identity of the friend. If the whitelist includes the identity of the friend, the terminal determines toprovide an expression image to the user and, thus, block 207 isperformed; otherwise, the terminal determines not to provide anexpression image to the user and, thus, the flowchart terminates.

For example, the terminal obtains the white list corresponding to theuser A, wherein the white list includes IMB and IMC. The terminal checkswhether the white list includes the identity IMB of the friend B. If thewhite list includes the identity IMB of the friend B, the terminaldetermines to provide an expression image to the user A, and thus block207 is performed.

Block 207: An expression image matching with chat content input by theuser is provided. The chat window includes a text input box. When theuser clicks the text input box, a keyboard button is displayed. The usermay edit the chat content through clicking the keyboard button, so as toinput the chat content in the text input box. In addition, there are alarge number of expression images in the server, and the user maydownload interested expression images from the server through theterminal. Each expression image corresponds to at least one expressionword for describing the emotion or meaning expressed by the expressionimage.

When detecting that the user inputs the chat content in the chat window,an expression word contained in the chat content input by the user isobtained, and an expression image corresponding to the expression wordis obtained. According to the identity of the friend and the obtainedexpression image, the number of sending operations performed for theexpression image is determined from the relationship between theexpression image, the number of sending operations performed for theexpression image and the identity of the friend. According to the numberof sending operations performed for the expression image, the expressionimage is displayed to the user. If the expression image corresponding tothe expression meaning word does not exist in the relationship betweenthe expression image, the number of sending operations performed for theexpression image and the identity of the friend, the number of sendingoperations performed for the expression image may be determined as 0.

The number of sending operations performed for each expression image maybe calculated, and all expression images may be ordered from the largestnumber of sending operations to the smallest number of sendingoperations or from the smallest number of sending operations to thelargest number of sending operations, and all ordered expression imagesare displayed to the user. According to various embodiments, theexpression images are ordered from the smallest number of sendingoperations to the largest number of sending operations. Further, anexpression image with the largest number of sending operations may bedisplayed to the user.

For example, as shown in FIG. 2-3, when detecting that the user A inputschat content “why do you say so” in the text input box of the chatwindow, an expression meaning word “why” contained in the chat content“why do you say so” input by the user A is obtained. Expression imagesPig1 and Pig2 corresponding to the expression meaning word “why” areobtained. According to the identity IMB of the friend B and the obtainedexpression images Pig1 and Pig2, from the relationship between theexpression images, the number of sending operations and the identitiesof the friends shown in Table 1, it may be determined that the number ofsending operations performed for the expression image Pig1 and thenumber of sending operations performed for the expression image Pig2 are10 and 20, respectively. According to the number of sending operationsperformed for the expression image Pig1 (i.e., 10) and the number ofsending operations performed for the expression image Pig2 (i.e., 20),the expression images Pig1 and Pig2 are ordered from the largest numberof sending operations to the smallest number of sending operations, andthe ordered expression images are Pig2 and Pig1. The ordered expressionimages Pig2 and Pig1 are displayed to the user A. The displayed chatwindow is shown in FIG. 2-4.

According to various embodiments of the present disclosure, the identityof the friend that is currently chatting with the user is obtained.According to the white list and the identity of the friend, it isdetermined whether to provide an expression image to the user. The whitelist includes an identity of a friend, wherein a frequency of usingexpression images when the friend in the white list chats with the usermeets a predefined condition. When determining to provide an expressionimage to the user, an expression image matching with the chat contentinput by the user is provided to the user. Because the identity of thefriend is added to the white list if the frequency of using expressionimages when the friend added to the white list chats with the user meetsthe predefined condition, it can be determined whether to provide anexpression image to the user according to the white list and theidentity of the friend. In this way, it can be determined whether it isproper to use expression images when the user chats with the friend, soas to avoid disturbing the user when providing expression images to theuser.

In FIG. 3, various embodiments of the present disclosure provide aflowchart illustrating an expression image matching method. The methodincludes following blocks.

Block 301: An identity of a session in which a user chats is obtained,wherein the session is a dialog set in which the user chats with atleast one other user. According to various embodiments, the session is adialog set in which the user chats with one other user, for example, thesession includes a dialog set performed between user A and user B.According to various embodiments, the session is a dialog set that theuser chats with more than one another user, for example, the sessionincludes a dialog set performed among the user A, user C, user D, anduser E. The other user may be any one of a friend, a followed user, or astranger of the user in an instant messaging application or a socialapplication. The session is established by the user, the friend or aserver. According to various embodiments, the identity of the session isan identity that is used for specially indicating the session in theserver, or an identity that is generated according to identities of allor part of users in the session.

Block 302: According to a white list and the identity of the session, itis determined whether to provide an expression image to the user,wherein the white list includes an identity of a session in which afrequency of using expression images meets a predefined condition.

Block 303: An expression image matching with chat content input by theuser is provided to the user when determining whether to provide theexpression image to the user.

According to various embodiments, before obtaining the identity of thesession in which the user chats, the method further includes:

-   -   calculating a frequency of using expression images in each        session according to a chat history of the user, wherein the        chat history includes messages in each session; and    -   adding an identity of a session in which a frequency of using        expression images meets a first predefined condition to the        white list.

According to various embodiments, a process of calculating the frequencyof using expression images in each session according to the chat historyof the user includes:

-   -   obtaining messages in a first session from the chat history of        the user, wherein the first session is any session of the user;    -   counting the number of the obtained messages and the number of        messages containing expression images among the obtained        messages; and    -   calculating the frequency of using expression images in the        first session according to the number of the messages containing        expression images and the number of the obtained messages.

In various embodiments, a process of adding the session in which thefrequency of using expression images meets the first predefinedcondition to the white list includes:

-   -   adding the identity of the session in which the frequency of        using expression images is larger than a predefined frequency        threshold to the white list, or    -   calculating an average frequency according to the frequency of        using expression images in each session, and adding the identity        of the session in which the frequency of using expression images        is larger than the average frequency to the white list.

In various embodiments, after adding the session in which the frequencyof using expression images meets the first predefined condition to thewhite list, the method further includes:

-   -   obtaining a frequency of the user sending expression images in a        second session and a frequency of the other user sending        expression images in the second session, wherein the other user        is a user except the user in the second session; and    -   if a comparing result between the frequency of the user sending        expression images in the second session and the frequency of the        other user sending expression images in the second session meets        a second predefined condition, adding an identity of the second        session to the white list.

In various embodiments, a process of providing the expression imagematching with the chat content input by the user includes:

-   -   obtaining an expression meaning word contained in the chat        content input by the user;    -   obtaining an expression image corresponding to the expression        meaning word;    -   when there are at least two expression images, according to the        identity of the session and the expression images, determining        the number of sending operations performed for each of the        expression images from a predefined relationship, wherein the        predefined relationship is a relationship between the expression        images, the number of sending operations, and identities of        sessions; and    -   displaying the expression images to the user after ordering the        expression images according to the number of sending operations        performed for each of the expression images.

In various embodiments, before obtaining the expression meaning wordcontained in the chat content input by the user, the method furtherincludes:

-   -   obtaining an expression image sent by the user and the number of        sending operations performed for the expression image from the        messages of the user in the session, and storing the expression        image, the number of sending operations performed for the        expression image, and the identity of the session into the        predefined relationship.

In various embodiments, a process of providing the expression imagematching with the chat content input by the user includes:

-   -   if an average frequency of the user sending expression images in        the session is smaller than a predefined average frequency,        decreasing a frequency of providing expression images to the        user.

In the various embodiments of the present disclosure, the identity ofthe session in which the user chats is obtained. According to the whitelist and the identity of the session, it is determined whether toprovide an expression image to the user. The white list includes anidentity of a session in which a frequency of using expression imagesmeets a predefined condition. When determining to provide an expressionimage to the user, an expression image matching with the chat contentinput by the user is provided to the user. Because the identity of thesession in which the frequency of using expression images meets thepredefined condition is added to the white list, it can be determinedwhether to provide an expression image to the user according to thewhite list and the identity of the session. In this way, it can bedetermined whether it is proper to use expression images in the session,so as to avoid disturbing the user when providing expression images tothe user.

In FIG. 4, various embodiments of the present disclosure provide aflowchart illustrating an expression image matching method. A bodyexecuting the method may be a terminal. The method includes thefollowing blocks.

Before providing an expression image to a user, a white listcorresponding to the user may be set first according to the followingblocks 401-403. The white list includes an identity of a session inwhich a frequency of using expression images meets a predefinedcondition.

Block 401: A frequency of using the expression images in each session iscalculated according to a chat history of the user, wherein the chathistory includes messages in each session. The chat history of the useris stored in a server. The chat history of the user includes messagesthat were generated when the user chatted with another user in eachsession in a recent period of time. For example, the chat history mayinclude messages that were generated when the user chatted with anotheruser in each session in the past week.

In this block, the terminal sends a request message for transmitting thechat history to the server. The request message contains an identity ofthe user, so that the server may obtain, according to the identity ofthe user, the chat history of the user that chats with another user ineach session. The terminal receives the chat history sent by the server.

The terminal selects a session from multiple sessions corresponding tothe user, and determines the selected session as a first session. Theterminal obtains, from the chat history of the user, messages in thefirst session in which the user chatted with another user. The terminalcounts the number of the obtained messages and the number of messagescontaining expression images among the obtained messages. The terminalcalculates a frequency of using expression images in the first sessionaccording to the number of the messages containing expression images andthe number of the obtained messages. Any session corresponding to theuser may be determined as the first session. According to the aboveprocess, the terminal may calculate a frequency of using expressionimages in each session.

In various embodiments, the terminal calculates a ratio of the number ofthe messages containing expression images in the first session to thenumber of the obtained messages in the first session, and determines theratio as the frequency of using expression images in the first session.For example, suppose the first session includes messages that weregenerated when user A chatted with users B, C, and D, respectively. Theterminal obtains the number of all the messages in the first session,i.e., 100, and the number of messages containing expression images amongthe messages, i.e., 50. The terminal calculates the frequency of usingexpression images in the first session to obtain a value 0.5.

For another example, suppose a second session includes messages thatwere generated when the user A chatted with the user C. The terminalobtains the number of all the messages in the second session, i.e., 200,and the number of messages containing expression images among themessage, i.e., 40. The terminal calculates a frequency of usingexpression images in the second session to obtain a value 0.2.

After obtaining the frequency of using expression images in each sessionaccording to block 401, the white list may be set according to followingblocks 402 and 403.

Block 402: An identity of a session in which a frequency of usingexpression images meets a first predefined condition is added to thewhite list. According to different first predefined conditions, block402 may be implemented through the following first and second methods.

In the first method, the first predefined condition is that a frequencyof using expression images is larger than a predefined frequencythreshold. Accordingly, the terminal adds an identity of a session inwhich a frequency of using expression images is larger than thepredefined frequency threshold to the white list. The frequency of usingexpression images in each session compares with the predefined frequencythreshold, a session in which a frequency of using expression images islarger than the predefined frequency threshold is selected, and anidentity of the selected session is added to the white list. Forexample, suppose the predefined frequency threshold is 0.4. An identityof session B in which a frequency of using expression images is largerthan the predefined frequency threshold 0.4 is added to the white list.

In the second method, the first predefined condition is that of afrequency of using expression images in a session is larger than anaverage frequency. Accordingly, an identity of the session in which thefrequency of using expression images is larger than the averagefrequency is added to the white list. According to the frequency ofusing expression images in each session, an average frequency iscalculated, and an identity of a session in which a frequency of usingexpression images is larger than the average frequency is added to thewhite list. The average frequency may be calculated according to afollowing method. The frequency of using expression images in eachsession corresponding to the user is calculated first, and then a sum ofall frequencies is calculated to obtain a total frequency. The number ofsessions corresponding to the user is counted, a ratio of the totalfrequency to the number of sessions corresponding to the user iscalculated, and is determined as the average frequency.

For example, a frequency of using expression images in each of threesessions corresponding to the user A is calculated to obtain threefrequencies 0.5, 0.2 and 0.3, respectively, and a sum of the threefrequencies is calculated to obtain a total frequency 1. The number ofsessions corresponding to the user A is counted to obtain a value 3, aratio of the total frequency (i.e., 1) to the number of sessions (i.e.,3) is calculated to obtain a value 0.33, and the ratio 0.33 isdetermined as the average frequency. The identity (i.e., IM-B) of thesession B corresponding to the user A is added to the white list, inwhich the frequency of using expression images is larger than theaverage frequency 0.33.

When the average frequency corresponding to the user is smaller than apredefined average frequency, it can be determined that the user usesless expression images and, thus, a frequency of providing expressionimages to the user may be decreased. The predefined average frequencymay be an average value of frequencies of using expression images in allsessions in the social application. Those skilled may count the averagefrequency of all sessions in the social application, and determine theaverage frequency as the predefined average frequency.

The frequency of providing expression images to the user may bedecreased through following first and second methods.

In the first method, one expression image matching operation isperformed for the user for a predefined number of chat messages. Forexample, one expression image matching operation is performed for theuser every three chat messages. Suppose the user inputs five chatmessages. When the user inputs the first chat message, the expressionimage matching operation is performed for the user. When the user inputsthe second, third, and fourth chat messages, no expression imagematching operation is performed for the user. When the user inputs thefifth chat message, the expression image matching operation is performedfor the user.

In the second method, one expression image matching operation isperformed for the user for a preset period of time and when the userinputs a chat message. For example, suppose one expression imagematching operation is performed for the user every half hour. The userchats with a friend during a period of time from 1:00 to 2:00, andinputs a chat message at 1:00, 1:20, and 1:30, respectively.Accordingly, when the user inputs the chat message at 1:00, oneexpression image matching operation is performed for the user. When theuser inputs the chat message at 1:20, no expression image matchingoperation is performed for the user. When the user inputs the chatmessage at 1:30, one expression image matching operation is performedfor the user. If the user does not input the chat message at 1:30, noexpression image matching operation is performed for the user.

After setting the white list according to block 402, an identity of asession meeting a second predefined condition may be added to the whitelist according to following block 403.

Block 403: A frequency of the user sending expression images in a secondsession and a frequency of another user sending expression images in thesecond session are obtained, wherein the mentioned another user is auser except the user in the second session. If a comparing resultbetween the frequency of the user sending expression images in thesecond session and the frequency of another user sending expressionimages in the second session meets the second predefined condition, anidentity of the second session is added to the white list.

The second predefined condition may be that the frequency of anotheruser sending expression images in the second session is larger than thefrequency of the user sending expression images in the second session,or may be that the frequency of another user sending expression imagesis a predefined multiple of the frequency of the user sending expressionimages in the second session. During a chat process in which the userchats with another user, if the frequency of another user sendingexpression images is high, it can be determined that the user may acceptmatched expression images. Accordingly, the identity of the secondsession may be added to the white list corresponding to the user.

In this block, a session is selected from sessions excluded from thewhite list, and is taken as the second session. History chat messages inthe second session in which the user chatted with another user areobtained from the history chat record of the user. According to theobtained history chat messages, the number of messages sent by the userin the second session, the number of messages containing expressionimages sent by the user in the second session, the number of messagessent by another user in the second session, and the number of messagescontaining expression images sent by another user in the second sessionare counted. According to the number of messages containing expressionimages sent by the user in the second session and the number of messagessent by the user in the second session, the frequency of the usersending expression images in the second session is calculated. Accordingto the number of messages containing expression images sent by anotheruser in the second session and the number of messages sent by anotheruser in the second session, the frequency of another user sendingexpression images in the second session is calculated. If the frequencyof another user sending expression images in the second session and thefrequency of the user sending expression images in the second sessionmeet the second predefined condition, the identity of the second sessionmay be added to the white list.

Similar to the above process performed for the second session, it can bedetermined whether a frequency of sending expression images in eachsession excluded from the white list and the frequency of the usersending expression images in the session meet the second predefinedcondition. When determining that the frequency of sending expressionimages in the session and the frequency of the user sending expressionimages in the session meet the second predefined condition, the identityof the session may be added to the white list.

For example, suppose the second session is session C. From the chathistory of the user A, messages in the second session C are obtained.Suppose in the messages in the second session C, the number of messagessent by the user A is 100, the number of messages containing expressionimages is 10, the number of messages sent by another user is 100, andthe number of messages containing expression images is 30. According tothe number of messages containing expression images sent by the user Ain the second session C (i.e., 10) and the number of messages sent bythe user A in the second session C (i.e., 100), the frequency of theuser A sending expression images in the second session C is calculatedto obtain a value 0.1. According to the number of messages containingexpression images sent by another user in the second session C (i.e.,30) and the number of messages sent by another user in the secondsession C (i.e., 100), the frequency of another user sending expressionimages in the second session C is calculated to obtain a value 0.3.Suppose the second predefined condition is that the frequency of anotheruser sending expression images in the second session C is larger thanthe frequency of the user A sending expression images in the secondsession C, the frequency of another user sending expression images inthe second session C (i.e., 0.3) and the frequency of the user A sendingexpression images in the second session C (i.e., 0.1) meet the secondpredefined condition, and thus the identity (i.e., IM-C) of the secondsession C may be added to the white list.

When setting the white list according to blocks 401-403, a relationshipbetween an expression image, the number of sending operations performedfor the expression image and an identity of a session may be storedaccording to following block 404, so as to provide an expression imageto the user according to the number of the user using the expressionimage.

Block 404: An expression image sent by the user and the number ofsending operations performed for the expression image are obtained frommessages in the session corresponding to the user, and the expressionimage, the number of sending operations performed for the expression,and the identity of the session are stored in the predefinedrelationship.

For each session corresponding to the user, the history chat messages inthe session are obtained from the history chat record of the user. Eachexpression image sent by the user is obtained from the obtained historychat messages, and the number of sending operations performed for eachexpression image by the user is counted. Each expression image sent bythe user, the number of sending operations performed for the expressionimage and the identity of the session are stored in a predefinedrelationship.

For example, history chat messages of user A in session X are obtainedfrom the history chat record of the user A. Expression images Pig1 andPig2 sent by the user A are obtained from the obtained history chatmessages, the number of sending operations performed for the expressionimage Pig1 by the user A is counted to obtain a value 10, and the numberof sending operations performed for the expression image Pig2 by theuser A is counted to obtain a value 20. The expression image Pig1 sentby the user A, the number of sending operations performed for theexpression image Pig1 (i.e., 10) and the identity IM-X of the session Xis stored in the predefined relationship shown in Table 2, and theexpression image Pig2 sent by the user A, the number of sendingoperations performed for the expression image Pig2 (i.e., 20) and theidentity IM-X of the session X is stored in the predefined relationshipshown in Table 2.

TABLE 2 the number of identities of expression images sending operationssessions Pig1 10 IM-X Pig2 20 IM-X . . . . . . . . .

After setting the white list according to blocks 401-404 and storing thepredefined relationship, the expression image may be provided to theuser according to following blocks 405-407.

Block 405: An identity of a session in which the user chats is obtained.When chatting with another user, the user opens a chat windowcorresponding to the session, and chats with another user in the chatwindow. In this block, when detecting that the user opens a chat windowcorresponding to a session in the social application, the terminalobtains an identity of the session corresponding to the chat window.

Block 406: According to the white list and the identity of the session,it is determined whether to provide an expression image to the user. Ifyes, block 407 is performed; otherwise, the flowchart terminates. Theterminal obtains the white list corresponding to the user and checkswhether the white list includes the identity of the session. If thewhite list includes the identity of the session, the terminal determinesto provide an expression image to the user and, thus, block 407 isperformed; otherwise, the terminal determines not to provide anexpression image to the user, and the flowchart terminates.

Block 407: An expression image matching with chat content input by theuser is provided. The chat window includes a text input box. When theuser clicks the text input box, a keyboard button is displayed. The usermay edit the chat content through clicking the keyboard button, so as toinput the chat content in the text input box. In addition, there are alarge number of expression images in the server, and the user maydownload interested expression images from the server through theterminal. Each expression image corresponds to at least one expressionword for describing the emotion or meaning expressed by the expressionimage.

When detecting that the user inputs the chat content in the chat window,an expression word contained in the chat content input by the user isobtained, and an expression image corresponding to the expression wordis obtained. According to the identity of the session and the obtainedexpression image, the number of sending operations performed for theexpression image is determined from the relationship between theexpression image, the number of sending operations performed for theexpression image, and the identity of the friend. According to thenumber of sending operations performed for the expression image, theexpression image is displayed to the user. If the expression imagecorresponding to the expression word does not exist in the predefinedrelationship, the number of sending operations performed for theexpression image may be determined as 0.

In various embodiments, the terminal may calculate the number of sendingoperations performed for each expression image, order all expressionimages from the largest number of sending operations to the smallestnumber of sending operations or from the smallest number of sendingoperations to the largest number of sending operations, and display allordered expression images to the user. In various embodiments, theexpression images are ordered from the smallest number of sendingoperations to the largest number of sending operations. Further, theterminal may display an expression image with the largest number ofsending operations to the user.

In the various embodiments of the present disclosure, the identity ofthe session in which the user chats is obtained. According to the whitelist and the identity of the session, it is determined whether toprovide an expression image to the user. The white list includes anidentity of a session in which a frequency of using expression imagesmeets a predefined condition. When determining whether to provide anexpression image to the user, an expression image matching with the chatcontent input by the user is provided to the user. Because the identityof the session in which the frequency of using expression images meetsthe predefined condition is added to the white list, it can bedetermined whether to provide an expression image to the user accordingto the white list and the identity of the session. In this way, it canbe determined whether it is proper to use expression images in thesession, so as to avoid disturbing the user when providing expressionimages to the user.

In FIG. 5, various embodiments of the present disclosure provide anexpression image matching apparatus. The apparatus includes:

-   -   an obtaining module 501, configured to obtain an identity of a        session in which a user chats, wherein the session is a dialog        set in which the user chats with at least one another user;    -   a determining module 502, configured to determine, according to        a white list and the identity of the session, whether to provide        an expression image to the user, wherein the white list includes        an identity of a session in which a frequency of using        expression images meets a predefined condition; and    -   a matching module 503, configured to provide an expression image        matching with chat content input by the user when determining to        provide the expression image to the user.

In various embodiments, the apparatus further includes:

-   -   a calculating module, configured to calculate a frequency of        using expression images in each session according to a chat        history of the user, wherein the chat history includes messages        in each session; and    -   a creating module, configured to add a session in which a        frequency of using expression images meets a first predefined        condition to the white list.

In various embodiments, the calculating module includes:

-   -   a first obtaining unit, configured to obtain messages in a first        session from the chat history of the user, wherein the first        session is any session of the user;    -   a counting unit, configured to count the number of the obtained        messages and the number of messages containing expression images        among the obtained messages; and    -   a calculating unit, configured to calculate the frequency of        using expression images in the first session according to the        number of the messages containing expression images and the        number of the obtained messages.

In various embodiments, the creating module includes:

-   -   a first creating unit, configured to add the identity of the        session in which the frequency of using expression images is        larger than a predefined frequency threshold to the white list,        or    -   a second creating unit, configured to calculate an average        frequency according to the frequency of using expression images        in each session, and add the identity of the session in which        the frequency of using expression images is larger than the        average frequency threshold to the white list.

In various embodiments, the apparatus further includes:

-   -   an adding module, configured to obtain a frequency of the user        sending expression images in a second session and a frequency of        another user sending expression images in the second session,        wherein the another session is a user except the user in the        second session; if a comparing result between the frequency of        the user sending expression images in the second session and the        frequency of another user sending expression images in the        second session meets a second predefined condition, adding an        identity of the second session to the white list.

In various embodiments, the matching module 503 includes:

-   -   a second obtaining unit, configured to obtain an expression word        contained in the chat content input by the user, and obtain an        expression image corresponding to the expression word; and    -   a determining unit, configured to determine, when there are at        least two expression images, the number of sending operations        performed for each of the expression images from a predefined        relationship according to the identity of the session and the        expression image, wherein the predefined relationship is a        relationship between the expression images, the number of        sending operations and identities of sessions; and    -   a displaying unit, configured to display the expression images        to the user after ordering the expression images according to        the number of sending operations performed for each of the        expression images.

In various embodiments, the apparatus further includes:

-   -   a storing module, configured to obtain an expression image sent        by the user and the number of sending operations performed for        the expression image from the messages of the user in the        session, and store the expression image, the number of sending        operations performed for the expression image, and the identity        of the session into the predefined relationship.

In various embodiments, the matching module 503, configured to decreasea frequency of providing expression images to the user if an averagefrequency of the user sending expression images in the session issmaller than a predefined average frequency.

In the various embodiments of the present disclosure, the identity ofthe session in which the user chats is obtained. According to the whitelist and the identity of the session, it is determined whether toprovide an expression image to the user. The white list includes anidentity of a session in which a frequency of using expression imagesmeets a predefined condition. When determining to provide an expressionimage to the user, an expression image matching with the chat contentinput by the user is provided to the user. Because the identity of thesession in which the frequency of using expression images meets thepredefined condition is added to the white list, it can be determinedwhether to provide an expression image to the user according to thewhite list and the identity of the session. In this way, it can bedetermined whether it is proper to use expression images in the session,so as to avoid disturbing the user when providing expression images tothe user.

In FIG. 6, various embodiments of the present disclosure provide astructure of the terminal described in the various embodiments. Theterminal may be used to implement the expression image matching methodprovided by the various embodiments.

A terminal 900 may include a Radio Frequency (RF) circuit 110, a storage120 including one or more computer readable storage mediums, aninputting unit 130, a displaying unit 140, a sensor 150, an audiocircuit 160, a wireless fidelity (WiFi) module 170, a processor 180including one or more processing units, and a power 190. Those skilledin the art will understand that the terminal is not limited by thestructure of the terminal shown in FIG. 6, but can include more or lesscomponents than the components in the structure shown in FIG. 6, or cancombine some components in the structure shown in FIG. 6, or can have acomponent arrangement different from the component arrangement in thestructure shown in FIG. 6.

The RF circuit 110 may transmit and receive signals during aninformation transmitting and receiving process or a call process.Particularly, the RF circuit 110 may receive downlink information from abase station and transmit the downlink information to the one or moreprocessors 180. In addition, the RF circuit 110 may transmit uplink datato the base station. Usually, the RF circuit 110 includes, but is notlimited to, an antenna, at least one amplifier, a tuner, one or moreoscillators, a Subscriber Identity Module (SIM) card, a transceiver, acoupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, theRF circuit 110 may also communicate with a network and othercommunication devices through wireless communication. Any of thecommunication standards or protocols may be used in the wirelesscommunication, which include, but are not limited to, Global System ofMobile communication (GSM), General Packet Radio Service (GPRS), CodeDivision Multiple Access (CDMA), Wideband Code Division Multiple Access(WCDMA), Long Term Evolution (LTE), Email, Short Messaging Service(SMS), etc.

The storage 120 may store software programs and modules, and theprocessor 180 may operate the software programs and modules stored inthe storage 120 to implement a variety of functional applications anddata processing. The storage 120 may include a program storage area anda data storage area. The program storage area may store an operationsystem and an application program for implementing at least one function(e.g., an audio playing function, a video playing function and so on).The data storage area may store data created when the terminal 900 isused (e.g., audio data, contact data and so on). In addition, thestorage 120 may include a high-speed random access memory and anon-transitory memory, such as at least one disk storage device, flashdevice or a transitory solid-state storage device. Accordingly, thestorage 120 may also include a storage controller to provide the accessto the storage 120 for the processor 180 and the inputting unit 130.

The inputting unit 130 may receive an input numeral or characterinformation, and generate signal input of a keyboard, a mouse, anoperating lever, optics or a trackball related with user configurationand function control. The inputting unit 130 may include a touchsensitive panel 131 and another inputting device 132. The touchsensitive panel 131 is also called a touch screen or a touch pad, andmay collect a touch operation performed by a user on or near the touchsensitive panel 131 (e.g., the user performs an operation on or near thetouch panel 131 with any suitable object or accessory such as a fingerand a touchpen), and drive a connection device according to a presetprogram. The touch sensitive panel 131 may include a touch detectionapparatus and a touch controller. The touch detection apparatus maydetect a touch position of the user, detect a signal generated based onthe touch operation, and transmit the signal to the touch controller.The touch controller may receive touch information from the touchdetection apparatus, convert the touch information into a touch pointcoordinate, transmit the touch point coordinate to the processor 180,and receive and execute a command sent by the processor 180. Inaddition, the touch sensitive panel 131 may be implemented by multiplemodes, such as a resistive mode, a capacitive mode, an infrared mode ora surface acoustic wave mode. In addition to the the touch sensitivepanel 131, the inputting unit 130 may further include another inputtingdevice 132. The inputting device 132 may include, but is not limited to,at least one of a physical keyboard, a function key (such as a volumecontrol key, a switch key etc.), a trackball, a mouse, and an operatinglever.

The displaying unit 140 may display information input by the user orinformation provided to the user and various graphical user interfacesof the terminal 900. The graphical user interfaces may be constructed bygraphics, texts, icons, videos, and any combination thereof. Thedisplaying unit 140 may include a displaying panel 141, which may beconfigured by a Liquid Crystal Display (LCD) and an OrganicLight-Emitting Diode (OLED). Further, the touch sensitive panel 131 maybe covered with the displaying panel 141. When detecting the touchoperation on or near the touch sensitive panel 131, the touch sensitivepanel 131 transmits the touch operation to the processor 180 todetermine the type of the touch event. Afterwards, the processor 180provides a video output on the displaying panel 141 according to thetype of the touch event. Although the touch sensitive panel 131 and thedisplaying panel 141 are used as two independent components to implementan inputting function and an outputting function respectively in FIG. 6,in various embodiments, the touch sensitive panel 131 and the displayingpanel 141 may be integrated to implement the inputting function and theoutputting function.

The terminal 900 may further include a sensor 150, such as a lightsensor, a motion sensor, and another sensor. The light sensor mayinclude an ambient light sensor and a proximity sensor. The ambientlight sensor may adjust the brightness of the displaying panel 141according to the brightness of ambient light. The proximity sensor mayclose the displaying panel 141 and/or become backlit when the terminal900 is moved to an ear. As one kind of motion sensor, a gravityaccelerometer sensor can detect a value of acceleration on alldirections (typically three-axis). The gravity accelerometer sensor maydetect the value and direction of gravity in stationary, identify aposture of a mobile phone (such as switch between a horizontal screenand a vertical screen, a related game, magnetometer posture calibrationand so on), and implement a vibration recognition related function (suchas a pedometer and a percussion). Another sensor such as a gyroscope, abarometer, a hygrometer, a thermometer and an infrared sensor may beconfigured in the terminal 900, which will not be described in detailherein.

The audio circuit 160, the speaker 161, and the microphone 162 mayprovide an audio interface between the user and the terminal 900. Theaudio circuit 160 may transmit to the speaker 161 an electric signaltransformed from received audio data. The speaker 161 transforms theelectric signal to a sound signal and outputs the sound signal. On theother hand, the microphone 162 transforms the collected sound signal toan electric signal. The audio circuit 160 receives the electric signal,transforms the electric signal to audio data, and outputs the audio datato the processor 180. After the audio data is processed by the processor180, the audio data is transmitted to another terminal via the RFcircuit 110, or is output to the storage 120 for further processing. Theaudio circuit 160 may also include a headset jack to providecommunication between peripheral headset and the terminal 900.

The Wi-Fi module is based on a short-range wireless transmissiontechnology. The terminal 900 may help the user to transmit and receivean email, browse a webpage and access a streaming media through theWi-Fi module 170. The Wi-Fi module 170 may provide the user with accessto a wireless broadband internet. Though the Wi-Fi module 170 is shownin FIG. 6, it can be understood that the Wi-Fi module 170 is not anecessary component of the terminal 900 and may be omitted as necessarywithout changing the scope of the present disclosure.

The processor 180 is a control center of the terminal 900. The processor180 is connected with all components of the terminal 900 via variousinterfaces and circuits, and may implement various functions and dataprocessing of the terminal 900 through operating or executing thesoftware programs and/or modules stored in the storage 120 and callingdata stored in the storage 120, thereby overall monitoring the terminal900. The processor 180 may include one or more processing units. Theprocessor 180 may include an application processor and a modemprocessor. The application processor may process an operation system, auser interface, and application programs. The modem processor mayprocess wireless communication. It can be understand that the aboveprocessor 180 may also not include the modem processor.

The terminal 900 may further include a power 190 (such as battery) forproviding power supply to various components. The power 190 may beconnected with the processor 180 through a power management system, soas to manage such functions as charging, a discharging and powerconsumption through the power management system. The power 190 may alsoinclude one or more Direct Current (DC) or Alternating Current (AC)powers, a recharging system, a power failure detection circuit, a powerconverter or an inverter, a power status indicator, etc.

The terminal 900 may further include a camera and a Bluetooth module,which are not shown in FIG. 9. In the various embodiments of the presentdisclosure, the displaying unit of the terminal 900 is a touch screendisplay. The terminal 900 may further include storage and one or moreprograms are stored in the storage. The one or more programs areconfigured to be executed by the one or more processors. The one or moreprograms include instructions for performing the following operationsof:

-   -   obtaining an identity of a friend that is chatting with a user        currently;    -   determining whether to provide an expression image to the user        according to a white list and the identity of the friend,        wherein the white list includes an identity of a friend, and a        frequency of using expression images when the friend in the        white list chats with the user meets a predefined condition;    -   when determining to provide an expression image to the user,        providing an expression image matching with chat content input        by the user to the user;    -   obtaining an identity of a session in which a user chats, and        the session being a dialog set in which the user chats with at        least one another user;    -   determining, according to a white list and the identity of the        session, whether to provide an expression image to the user, and        the white list comprising an identity of a session in which a        frequency of using expression images meets a predefined        condition; and    -   providing an expression image matching with chat content input        by the user when determining to provide the expression image to        the user.

In various embodiments, the one or more programs further includeinstructions for performing following operations of:

-   -   calculating a frequency of using expression images in each        session according to a history chat record of the user, wherein        the history chat record includes history chat messages in each        session; and    -   adding an identity of a session in which a frequency of using        expression images meets a first predefined condition to the        white list.

In various embodiments, the one or more programs further includeinstructions for performing following operations of:

-   -   obtaining messages in a first session from the chat history of        the user, wherein the first session is any session of the user;    -   counting the number of the obtained messages and the number of        messages containing expression images among the obtained        messages; and    -   calculating the frequency of using expression images in the        first session according to the number of the messages containing        expression images and the number of the obtained messages.

In various embodiments, the one or more programs further includeinstructions for performing the following operations of:

-   -   adding the identity of the session in which the frequency of        using expression images is larger than a predefined frequency        threshold to the white list, or    -   calculating an average frequency according to the frequency of        using expression images in each session, and adding the identity        of the session in which the frequency of using expression images        is larger than the average frequency to the white list.

In various embodiments, the one or more programs further includeinstructions for performing the following operations of:

-   -   obtaining a frequency of the user sending expression images in a        second session and a frequency of the another user sending        expression images in the second session, wherein the another        user is a user except the user in the second session; and    -   if a comparing results between the frequency of the user sending        expression images in the second session and the frequency of the        another user sending expression images in the second session        meets a second predefined condition, adding an identity of the        second session to the white list.

In various embodiments, the one or more programs further includeinstructions for performing the following operations of:

-   -   obtaining an expression meaning word contained in the chat        content input by the user;    -   obtaining an expression image corresponding to the expression        meaning word;    -   when there are at least two expression images, according to the        identity of the session and the expression images, determining        the number of sending operations performed for each of the        expression images from a predefined relationship, wherein the        predefined relationship is a relationship between the expression        images, the number of sending operations and identities of        sessions; and    -   displaying the expression images to the user after ordering the        expression images according to the number of sending operations        performed for each of the expression images.

In various embodiments, the one or more programs further includeinstructions for performing the following operations of:

-   -   obtaining an expression image sent by the user and the number of        sending operations performed for the expression image from the        messages of the user in the session, and storing the expression        image, the number of sending operations performed for the        expression image, and the identity of the session into the        predefined relationship.

In various embodiments, the one or more programs further includeinstructions for performing the following operations of:

-   -   if an average frequency of the user sending expression images in        the session is smaller than a predefined average frequency,        decreasing a frequency of providing expression images to the        user.

In the various embodiments of the present disclosure, the identity ofthe session in which the user chats is obtained. According to the whitelist and the identity of the session, it is determined whether toprovide an expression image to the user. The white list includes anidentity of a session in which a frequency of using expression imagesmeets a predefined condition. When determining to provide an expressionimage to the user, an expression image matching with the chat contentinput by the user is provided to the user. Because the identity of thesession in which the frequency of using expression images meets thepredefined condition is added to the white list, it can be determinedwhether to provide an expression image to the user according to thewhite list and the identity of the session. In this way, it can bedetermined whether it is proper to use expression images in the session,so as to avoid disturbing the user when providing expression images tothe user.

Those skilled in the art can understand that all or part of processes inthe method provided by the above embodiments can be implemented byhardware or by instructing related hardware by a program, and theprogram may be stored in a computer readable memory. The computerreadable memory includes a ROM, a disk, a Compact Disc (CD) and so on.

The foregoing are only some embodiments of the present disclosure andare not used to limit the protection scope of the present disclosure.Any modification, equivalent substitution, and improvement withoutdeparting from the spirit and principle of the present disclosure arewithin the protection scope of the present disclosure.

The foregoing description of the embodiments has been provided forpurposes of illustration and description. It is not intended to beexhaustive or to limit the disclosure. Individual elements or featuresof a particular embodiment are generally not limited to that particularembodiment, but, where applicable, are interchangeable and can be usedin a selected embodiment, even if not specifically shown or described.The same may also be varied in many ways. Such variations are not to beregarded as a departure from the disclosure, and all such modificationsare intended to be included within the scope of the disclosure.

The foregoing description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Thebroad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent upon a study of the drawings, thespecification, and the following claims. It should be understood thatone or more steps within a method may be executed in different order (orconcurrently) without altering the principles of the present disclosure.Further, although each of the embodiments is described above as havingcertain features, any one or more of those features described withrespect to any embodiment of the disclosure can be implemented in and/orcombined with features of any of the other embodiments, even if thatcombination is not explicitly described. In other words, the describedembodiments are not mutually exclusive, and permutations of one or moreembodiments with one another remain within the scope of this disclosure.

Spatial and functional relationships between elements (for example,between modules) are described using various terms, including“connected,” “engaged,” “interfaced,” and “coupled.” Unless explicitlydescribed as being “direct,” when a relationship between first andsecond elements is described in the above disclosure, that relationshipencompasses a direct relationship where no other intervening elementsare present between the first and second elements, and also an indirectrelationship where one or more intervening elements are present (eitherspatially or functionally) between the first and second elements. Asused herein, the phrase at least one of A, B, and C should be construedto mean a logical (A OR B OR C), using a non-exclusive logical OR, andshould not be construed to mean “at least one of A, at least one of B,and at least one of C.”

In this application, including the definitions below, the term ‘module’or the term ‘controller’ may be replaced with the term ‘circuit.’ Theterm ‘module’ may refer to, be part of, or include processor hardware(shared, dedicated, or group) that executes code and memory hardware(shared, dedicated, or group) that stores code executed by the processorhardware.

The module may include one or more interface circuits. In some examples,the interface circuits may include wired or wireless interfaces that areconnected to a local area network (LAN), the Internet, a wide areanetwork (WAN), or combinations thereof. The functionality of any givenmodule of the present disclosure may be distributed among multiplemodules that are connected via interface circuits. For example, multiplemodules may allow load balancing. In a further example, a server (alsoknown as remote, or cloud) module may accomplish some functionality onbehalf of a client module.

The term code, as used above, may include software, firmware, and/ormicrocode, and may refer to programs, routines, functions, classes, datastructures, and/or objects. Shared processor hardware encompasses asingle microprocessor that executes some or all code from multiplemodules. Group processor hardware encompasses a microprocessor that, incombination with additional microprocessors, executes some or all codefrom one or more modules. References to multiple microprocessorsencompass multiple microprocessors on discrete dies, multiplemicroprocessors on a single die, multiple cores of a singlemicroprocessor, multiple threads of a single microprocessor, or acombination of the above.

Shared memory hardware encompasses a single memory device that storessome or all code from multiple modules. Group memory hardwareencompasses a memory device that, in combination with other memorydevices, stores some or all code from one or more modules.

The term memory hardware is a subset of the term computer-readablemedium. The term computer-readable medium, as used herein, does notencompass transitory electrical or electromagnetic signals propagatingthrough a medium (such as on a carrier wave); the term computer-readablemedium is therefore considered tangible and non-transitory. Non-limitingexamples of a non-transitory computer-readable medium are nonvolatilememory devices (such as a flash memory device, an erasable programmableread-only memory device, or a mask read-only memory device), volatilememory devices (such as a static random access memory device or adynamic random access memory device), magnetic storage media (such as ananalog or digital magnetic tape or a hard disk drive), and opticalstorage media (such as a CD, a DVD, or a Blu-ray Disc).

The apparatuses and methods described in this application may bepartially or fully implemented by a special purpose computer created byconfiguring a general purpose computer to execute one or more particularfunctions embodied in computer programs. The functional blocks andflowchart elements described above serve as software specifications,which can be translated into the computer programs by the routine workof a skilled technician or programmer.

The computer programs include processor-executable instructions that arestored on at least one non-transitory computer-readable medium. Thecomputer programs may also include or rely on stored data. The computerprograms may encompass a basic input/output system (BIOS) that interactswith hardware of the special purpose computer, device drivers thatinteract with particular devices of the special purpose computer, one ormore operating systems, user applications, background services,background applications, etc.

The computer programs may include: (i) descriptive text to be parsed,such as HTML (hypertext markup language) or XML (extensible markuplanguage), (ii) assembly code, (iii) object code generated from sourcecode by a compiler, (iv) source code for execution by an interpreter,(v) source code for compilation and execution by a just-in-timecompiler, etc. As examples only, source code may be written using syntaxfrom languages including C, C++, C#, Objective-C, Haskell, Go, SQL, R,Lisp, Java®, Fortran, Perl, Pascal, Curl, OCaml, Javascript®, HTML5,Ada, ASP (active server pages), PHP, Scala, Eiffel, Smalltalk, Erlang,Ruby, Flash®, Visual Basic®, Lua, and Python®.

None of the elements recited in the claims are intended to be ameans-plus-function element within the meaning of 35 U.S.C. § 112(f)unless an element is expressly recited using the phrase “means for” or,in the case of a method claim, using the phrases “operation for” or“step for.”

What is claimed is:
 1. An expression image matching method, comprising:obtaining, by a computing device, an identity of a session in which auser chats, and the session being a dialog set in which the user chatswith at least one another user; determining, by the computing device,according to a white list and the identity of the session, whether toprovide an expression image to the user, and the white list comprisingan identity of a session in which a frequency of using expression imagesmeets a predefined condition: and providing, by the computing device, anexpression image matching with chat content input by the user whendetermining to provide the expression image to the user; beforeobtaining the identity of the session in which the user chats, themethod further comprising: calculating, by the computing device, afrequency of using expression images in each session according to ahistory chat record of the user, wherein the history chat recordincludes history chat messages in each session; and adding, by thecomputing device, an identity of a session in which a frequency of usingexpression images meets a first predefined condition to the white list.2. The method of claim 1, wherein the calculating the frequency of usingexpression images in each session according to the history chat recordof the user comprises: obtaining, by the computing device, history chatmessages in a first session from history the history chat record of theuser, wherein the first session is any session of the user; counting, bythe computing device, the number of the obtained history chat messagesand the number of history chat messages containing expression imagesamong the obtained history chat messages; and calculating, by thecomputing device, the frequency of using expression images in the firstsession according to the number of the history chat messages containingexpression images and the number of the obtained history chat messages.3. The method of claim 1, wherein adding the identity of the session inwhich the frequency of using expression images meets the firstpredefined condition to the white list comprises: adding, by thecomputing device, the identity of the session in which the frequency ofusing expression images is larger than a predefined frequency thresholdto the white list, or calculating, by the computing device, an averagefrequency according to the frequency of using expression images in eachsession, and adding the identity of the session in which the frequencyof using expression images is larger than the average frequency to thewhite list.
 4. The method of claim 3, wherein the providing theexpression image matching with the chat content input by the usercomprises: if an average frequency of the user sending expression imagesin the session is smaller than a predefined average frequency,decreasing, by the computing device, a frequency of providing expressionimages to the user.
 5. The method of claim 1, after adding the identityof the session in which the frequency of using expression images meetsthe first predefined condition to the white list, further comprising:obtaining, by the computing device, a frequency of the user sendingexpression images in a second session and a frequency of the anotheruser sending expression images in the second session, wherein theanother user is a user except the user in the second session; and if acomparing result between the frequency of the user sending expressionimages in the second session and the frequency of the another usersending expression images in the second session meets a secondpredefined condition, adding , by the computing device, an identity ofthe second session to the white list.
 6. The method of claim 1, whereinthe providing the expression image matching with the chat content inputby the user comprises: obtaining, by the computing device, an expressionmeaning word contained in the chat content input by the user; obtaining,by the computing device, an expression image corresponding to theexpression meaning word; when there are at least two expression images,according to the identity of the session and the expression images,determining, by the computing device, the number of sending operationsperformed for each of the expression images from a predefinedrelationship, wherein the predefined relationship is a relationshipbetween the expression images, the number of sending operations andidentities of sessions; and displaying, by the computing device, theexpression images to the user after ordering the expression imagesaccording to the number of sending operations performed for each of theexpression images.
 7. The method of claim 6, before obtaining theexpression meaning word contained in the chat content input by the user,further comprising: obtaining, by the computing device, an expressionimage sent by the user and the number of sending operations performedfor the expression image from the history chat messages of the user inthe session, and storing the expression image, the number of sendingoperations performed for the expression image and the identity of thesession into the predefined relationship.
 8. An expression imagematching apparatus, comprising: a processor and a storage, wherein thestorage stores computer readable instruction, and the processor executesthe computer readable instructions stored in the storage to: obtain anidentity of a session in which a user chats, and the session being adialog set in which the user chats with at least one another user:determine, according to a white list and the identity of the session,whether to provide an expression image to the user, and the white listincluding an identity of a session in which a frequency of usingexpression images meets a predefined condition; and provide anexpression image matching with chat content input by the user whendetermining to provide the expression image to the user; wherein theprocessor executes the computer readable instructions stored in thestorage to: calculate a frequency of using expression images in eachsession according to a history chat record of the user, wherein thehistory chat record includes history chat messages in each session; andadd a session in which a frequency of using expression images meets afirst predefined condition to the white list.
 9. The apparatus of claim8, wherein the processor executes the computer readable instructionsstored in the storage to: obtain history chat messages in a firstsession from the history chat record of the user, wherein the firstsession is any session of the user; count the number of the obtainedhistory chat messages and the number of history chat messages containingexpression images among the obtained history chat messages; andcalculate the frequency of using expression images in the first sessionaccording to the number of the history chat messages containingexpression images and the number of the obtained history chat messages.10. The apparatus of claim 8, wherein the processor executes thecomputer readable instructions stored in the storage to: add theidentity of the session in which the frequency of using expressionimages is larger than a predefined frequency threshold to the whitelist, or calculate an average frequency according to the frequency ofusing expression images in each session, and add the identity of thesession in which the frequency of using expression images is larger thanthe average frequency threshold to the white list.
 11. The apparatus ofclaim 8, wherein the processor executes the computer readableinstructions stored in the storage to: obtain a frequency of the usersending expression images in a second session and a frequency of anotheruser sending expression images in the second session, wherein theanother user is a user except the user in the second session; if acomparing result between the frequency of the user sending expressionimages in the second session and the frequency of another user sendingexpression images in the second session meets a second predefinedcondition, adding an identity of the second session to the white list.12. The apparatus of claim 8, wherein the processor executes thecomputer readable instructions stored in the storage to: obtain anexpression meaning word contained in the chat content input by the user,and obtain an expression image corresponding to the expression meaningword; and determine, when there are at least two expression images, thenumber of sending operations performed for each of the expression imagesfrom a predefined relationship according to the identity of the sessionand the expression image, wherein the predefined relationship is arelationship between the expression images, the number of sendingoperations and identities of sessions; and display the expression imagesto the user after ordering the expression images according to the numberof sending operations performed for each of the expression images.
 13. Aterminal, comprising: one or more processors and a storage, wherein thestorage is configured to store one or more programs, and the one or moreprograms are configured to be executed by the one or more processors,and comprise instructions for performing following operations of:obtaining an identity of a session in which a user chats, and thesession being a dialog set in which the user chats with at least oneanother user: determining according to a white list and the identity ofthe session, whether to provide an expression image to the usher, andthe while list comprising an identity of a session in which a frequencyof using expression images meets a predefined condition: and providingan expression image matching with chat content input by the user whendetermining to providing the expression image to the user; wherein theone or more processors further comprise instructions for performingfollowing operations of: calculating a frequency of using expressionimages in each session according to a history chat record of the user,wherein the history chat record includes history chat messages in eachsession; and adding an identity of a session in which a frequency ofusing expression images meets a first predefined condition to the whitelist.
 14. The terminal of claim 13, wherein the one or more processorsfurther comprise instructions for performing following operations of:obtaining history chat messages in a first session from the history chatrecord of the user, wherein the first session is any session of theuser; counting the number of the obtained history chat messages and thenumber of history chat messages containing expression images among theobtained history chat messages; and calculating the frequency of usingexpression images in the first session according to the number of thehistory chat messages containing expression images and the number of theobtained history chat messages.
 15. The terminal of claim 13, whereinthe one or more processors further comprise instructions for performingfollowing operations of: adding the identity of the session in which thefrequency of using expression images is larger than a predefinedfrequency threshold to the white list, or calculating an averagefrequency according to the frequency of using expression images in eachsession, and adding the identity of the session in which the frequencyof using expression images is larger than the average frequency to thewhite list.
 16. The terminal of claim 13, wherein the one or moreprocessors further comprise instructions for performing followingoperations of: obtaining a frequency of the user sending expressionimages in a second session and a frequency of the another user sendingexpression images in the second session, wherein the another user is auser except the user in the second session; and if a comparing resultbetween the frequency of the user sending expression images in thesecond session and the frequency of the another user sending expressionimages in the second session meets a second predefined condition, addingan identity of the second session to the white list.
 17. The terminal ofclaim 13, wherein the one or more processors further compriseinstructions for performing following operations of: obtaining anexpression meaning word contained in the chat content input by the user;obtaining an expression image corresponding to the expression meaningword; when there are at least two expression images, according to theidentity of the session and the expression images, determining thenumber of sending operations performed for each of the expression imagesfrom a predefined relationship, wherein the predefined relationship is arelationship between the expression images, the number of sendingoperations and identities of sessions; and displaying the expressionimages to the user after ordering the expression images according to thenumber of sending operations performed for each of the expressionimages.